srcdir       = @srcdir@
top_builddir = @top_builddir@
top_srcdir   = @top_srcdir@

include ../Makefile.ext

SCM_CATEGORY = rfc

LIBFILES = rfc--md5.$(SOEXT) rfc--sha.$(SOEXT)
SCMFILES = md5.sci sha1.scm sha.sci

GENERATED = Makefile
XCLEANFILES = rfc--md5.c rfc--sha.c *.sci

all : $(LIBFILES)

OBJECTS = $(md5_OBJECTS) $(sha_OBJECTS)

md5_OBJECTS = rfc--md5.$(OBJEXT) md5c.$(OBJEXT)

rfc--md5.$(SOEXT) : $(md5_OBJECTS)
	$(MODLINK) rfc--md5.$(SOEXT) $(md5_OBJECTS) $(EXT_LIBGAUCHE) $(LIBS)

md5.sci rfc--md5.c : md5.scm
	$(PRECOMP) -e -P -o rfc--md5 $(srcdir)/md5.scm

sha_OBJECTS = rfc--sha.$(OBJEXT) sha2.$(OBJEXT)

$(sha_OBJECTS) : sha2.h

rfc--sha.$(SOEXT) : $(sha_OBJECTS)
	$(MODLINK) rfc--sha.$(SOEXT) $(sha_OBJECTS) $(EXT_LIBGAUCHE) $(LIBS)

sha.sci rfc--sha.c : sha.scm
	$(PRECOMP) -e -P -o rfc--sha $(srcdir)/sha.scm

install : install-std

